package siteflash.controller;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import siteflash.model.Tag;

public class ListTag extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) 
		throws IOException {
		req.setAttribute("title", "Y1S Game Online Directory List Tag");
        req.setAttribute("keyword", "y1s, y1s.org, game directory, flash games, free flash games, online games, play game, fun, flash games online, list tags, list tag");
        req.setAttribute("description", "Y1s.org Flash Games Directory List All Tag, Flash Online Game Directory List All Tag");
	    
	    //List all tags
        ArrayList<Tag> tags = (ArrayList<Tag>) General.getTags();
        
        req.setAttribute("tags", tags);
        
        try {
            req.getRequestDispatcher("/pages/list_tags.jsp").forward(req, resp);
        } catch (Exception e) {
            //TODO: handle exception
            e.printStackTrace();
        }
	}
}
